package com.lianzhihui.romeex.mvp.presenter;

import android.content.Context;

import com.lianzhihui.romeex.bean.MyTeamBean;
import com.lianzhihui.romeex.mvp.model.MyTeamModelImp;
import com.lianzhihui.romeex.mvp.model.MyTeamModelInterface;
import com.lianzhihui.romeex.mvp.view.MyTeamView;

//逻辑实现
public class MyTeamPresnterImp implements MyTeamModelInterface {

    private final MyTeamView viewLayer;
    private final MyTeamModelImp modelImp;

    public MyTeamPresnterImp(Context context, MyTeamView viewLayer) {
        this.viewLayer = viewLayer;
        modelImp = new MyTeamModelImp(context, this);
    }

    public void requestSunFindsunrelation() {
        modelImp.requestSunFindsunrelation();
    }



    @Override
    public void onFailure() {
        viewLayer.setFailure();
    }

    @Override
    public void responseFindSunRelationSuccess(MyTeamBean bean) {
        viewLayer.findSunRelationSuccess(bean);
    }
}
